package com.grad.webstudy.enums;

/**
 * @Description:
 * @Author: zjf
 * @Date: 2020/2/5 14:34.
 */
public enum StatusEnums {

    AUDITING(1, "审核中"),
    PASS(4, "审核通过"),
    FAILED(5, "审核失败"),
    ONLINE(2,"上架"),
    OFFLINE(3,"下架"),
    DELETE(6,"原申请已删除"),
    ;

    private int status;
    private String desc;

    StatusEnums(int status, String desc) {
        this.status = status;
        this.desc = desc;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public static String getDescByStatus(int status){
        for (StatusEnums statusEnums : StatusEnums.values()) {
            if (status==statusEnums.getStatus()){
                return statusEnums.getDesc();
            }
        }
        return null;
    }
}
